Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Terraform Provider Google v6.16.0 #697

Open
wants to merge 47 commits into
base: main
Choose a base branch
from

Conversation

rickard-von-essen
Copy link
Contributor

@rickard-von-essen rickard-von-essen commented Jan 16, 2025

Description of your changes

Update the underlaying Terraform Provider Goolge to version 6.16.0.

Depends on #695

TODO:

  • Review and test breaking changes, see TPG - v6 Upgrade Guide
  • Bump provider-upjet-gcp major version? Suggest to create v2.0.0.
  • Describe upgrade procedures, Suggest to create docs/family/Upgrade_v2.md
  • deletionProtection decide how to handle it (change default?)
  • Check if this fixes any issues

Changed resources:

  • activedirectory_* added deletionProtection
  • alloydb multiple changes
  • apigee_nataddresses added activate flag
  • artifact multiple changes
  • bigtable_appprofile added rowAffinity
  • bigtable_table added columnFamily.type
  • bigquery multiple changes
  • certificatemanager: added sanDnsnames
  • cloudbuild added privateServiceConnect
  • cloudplatform multiple changes
  • cloudrun_* multiple updates
  • cloudtasks multiple changes
  • composer multiple changes
  • compute_* multiple updates
  • containerattached_cluster add securityPostureConfig
  • container multiple changes
  • containeraws_nodepool added kubeletConfig
  • dataproc multiple changes
  • datastore_index removed
  • dialogflowcx_agent added loggingSettings and speechSettings
  • dns added externalEndpoints and healthcheck
  • filestore multiple changes
  • iam multiple changes
  • identity_platform: Replaced project_default_config with config
  • orgpolicy_policy added parameters
  • monitoring multiple changes
  • networkconnectivity multiple changes
  • pubsub multiple changes
  • redis_cluster multiple changes
  • sourcerepo added createIgnoreAlreadyExists to repository
  • spanner multiple changes
  • storage multiple changes
  • sql multiple changes
  • workflows_workflows added deletionProtection
  • vpcaccess_connector updated test

TODO
Fixes #694
Fixes #656
(probably) Fixes #685

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • N/A Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Executed some sanity check with:

UPTEST_EXAMPLE_LIST="examples/secretmanager/v1beta2/secret.yaml,examples/cloudplatform/v1beta1/serviceaccount.yaml"
[...]
--- PASS: kuttl (49.67s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/case (48.30s)
PASS
12:33:44 [ OK ] running automated tests

@mergenci
Copy link
Collaborator

Thanks for opening this PR @rickard-von-essen 🙏 Terraform provider major version bump to v6 requires many breaking changes, including field type changes. I don't think it will be easy to consider the impact of these changes and handle accordingly. So, please be patient if we were not able to invest enough resources into this PR in the near future.

In order to make the reviewing easier, can you divide your work into commits? You can see a previous Terraform provider bump PR, in which we even committed make generate output separately. For instance, while reviewing the current changes I was surprised to see that you removed and added resources. If I could have directly understood, by reading the commit title, that you did so because a resource was renamed, it would have been much easier for me to follow your work.

There is a categorical change that we might want to consider how to handle: There are many resources which have a new deletion_protection field that defaults to true. This is a Terraform field and doesn't exist in the external resource. We might want to default it to false, so that Crossplane users could continue deleting resources as they would. Crossplane Resource Model (XRM) has always acted as deletion_protection = true anyways. Nevertheless, we should discuss the implications. A question I have in mind, for instance, is whether this field currently exists in our existing resources. If so, we might prefer to continue with our current behavior. Not deviating from the Terraform-defined behavior would also be a good argument.

@rickard-von-essen rickard-von-essen force-pushed the tpg-v6.16.0 branch 2 times, most recently from c9c43f2 to 7859d44 Compare January 28, 2025 19:29
@rickard-von-essen rickard-von-essen marked this pull request as ready for review January 28, 2025 19:30
Add new arg to conversion.RegisterConversions()

github.com/crossplane/crossplane-runtime v1.17.0
github.com/crossplane/upjet v1.4.1-0.20250108142216-db86f70a1651

Signed-off-by: Rickard von Essen <[email protected]>
…project_default_config, and datastore

Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
Signed-off-by: Rickard von Essen <[email protected]>
@rickard-von-essen
Copy link
Contributor Author

/test-examples="examples/activedirectory/v1beta1/domain.yaml,examples/alloydb/v1beta2/backup.yaml,examples/alloydb/v1beta2/instance.yaml,examples/alloydb/v1beta2/cluster.yaml,examples/alloydb/v1beta1/backup.yaml,examples/alloydb/v1beta1/instance.yaml,examples/alloydb/v1beta1/cluster.yaml,examples/artifact/v1beta2/registryrepository.yaml,examples/artifact/v1beta1/registryrepository.yaml,examples/apigee/v1beta1/nataddress.yaml"

@rickard-von-essen
Copy link
Contributor Author

/test-examples="examples/certificatemanager/v1beta2/certificate.yaml,examples/certificatemanager/v1beta1/certificate.yaml"

@rickard-von-essen
Copy link
Contributor Author

@rickard-von-essen
Copy link
Contributor Author

/test-examples="examples/cloudbuild/v1beta2/workerpool.yaml"

@rickard-von-essen
Copy link
Contributor Author

/test-examples="examples/cloudplatform/v1beta2/serviceaccountiammember.yaml,examples/cloudplatform/v1beta2/projectiammember.yaml,examples/cloudplatform/v1beta1/projectiamauditconfig.yaml,examples/cloudplatform/v1beta1/serviceaccountkey.yaml,examples/cloudplatform/v1beta1/projectservice.yaml,examples/cloudplatform/v1beta1/projectusageexportbucket.yaml,examples/cloudplatform/v1beta1/serviceaccountiammember.yaml,examples/cloudplatform/v1beta1/serviceaccount.yaml,examples/cloudplatform/v1beta1/projectiammember.yaml"

@rickard-von-essen
Copy link
Contributor Author

/test-examples="examples/cloudrun/v1beta2/domainmapping.yaml,examples/cloudrun/v1beta2/v2job.yaml,examples/cloudrun/v1beta2/v2service.yaml,examples/cloudrun/v1beta1/domainmapping.yaml,examples/cloudrun/v1beta1/v2job.yaml,examples/cloudrun/v1beta1/v2service.yaml"

deletion_protection was added in Terraform to help protect from
remove/create a resource when you change an immutable attribute. This is
not allowed in Crossplane so this is unnecessary. Also this overlap with
Crossplane managementPolicy.

Signed-off-by: Rickard von Essen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants